- content_for :head do
  = javascript_include_tag "volunteer_page"
  = javascript_include_tag 'http://maps.googleapis.com/maps/api/js?sensor=false'

.left.w60
  = form_for @volunteer do |f|
    = errors_for @volunteer

    %br
  
    = f.label :name
    = f.text_field :name, :class => 'w60'
    %br
    = f.label :voice_number
    = f.text_field :voice_number, :class => 'w60'
    %br
    = f.label :sms_number, 'SMS number'
    = f.text_field :sms_number, :class => 'w60'
    %br
    = f.hidden_field :lat
    = f.hidden_field :lng
    
    .box.w58
      = f.label :address
      = f.text_field :address, :placeholder => 'Search', :class => 'w54 ux-search'
      #map_canvas_volunteer
    %br

    = label_tag 'Skills'
    = text_field_tag 'volunteer[skill_names]', nil, :id => 'skills', :class => 'w60'
    %br
    %br

    = f.fields_for :shifts do |shift_form|
      = render :partial => 'shifts_matrix', :locals => {:f => shift_form}
    %br

    %button.white Save

  %button.white.cancel#cancelbtn Cancel
  
  - unless @volunteer.new_record?
    = form_tag volunteer_path(@volunteer), :method => :delete, 'data-confirm' => 'Are you sure?' do
      %button.fdelete.right Delete this volunteer
  %br{:clear => 'all'}

.right
.clear

%ul.hidden#allSkills
  - Skill.all.each do |s|
    %li= s.name

%ul.hidden#volSkills
  - @volunteer.skills.each do |s|
    %li= s.name
